#pragma once

#include<iostream>
using namespace std;

class Stack
{
public:
	void StackInit(int defaultCapacity = 4);
	void StackPush(int x)
	{
		//...
		a[top++] = x;
	}
	int StackTop()
	{
		return a[--top];
	}
	void StackDestory()
	{
		free(a);
		a = nullptr;
		top = capacity;
	}

	int* a;
	int top;
	int capacity;
};
